package cn.wei.example.provider;

import cn.wei.example.common.model.User;
import cn.wei.example.common.service.UserService;
import cn.wei.youvierpc.RpcApplication;
import cn.wei.youvierpc.bootstrap.ProviderBootstrap;
import cn.wei.youvierpc.config.RegistryConfig;
import cn.wei.youvierpc.config.RpcConfig;
import cn.wei.youvierpc.model.ServiceMetaInfo;
import cn.wei.youvierpc.model.ServiceRegisterInfo;
import cn.wei.youvierpc.registry.LocalRegistry;
import cn.wei.youvierpc.registry.Registry;
import cn.wei.youvierpc.registry.RegistryFactory;
import cn.wei.youvierpc.server.VertxHttpServer;
import cn.wei.youvierpc.server.tcp.VertxTcpServer;

import java.util.ArrayList;
import java.util.List;

public class ProviderExample {

    public static void main(String[] args) {
        List<ServiceRegisterInfo<?>> serviceRegisterInfos  = new ArrayList<>();

        ServiceRegisterInfo<UserServiceImpl> userServiceServiceRegisterInfo = new ServiceRegisterInfo<>(UserService.class.getName(), UserServiceImpl.class);

        serviceRegisterInfos.add(userServiceServiceRegisterInfo);

        ProviderBootstrap.init(serviceRegisterInfos);

    }
}
